import { Body, Controller, Get, Post } from '@nestjs/common';
import { AppService } from './app.service';

@Controller("queryAPI")
export class AppController {
  constructor(private readonly appService: AppService) {}

  @Get("/getDataForLineName")
  async getDataForLineName(@Body() body) {
    return  await this.appService.getDataForLineName(body.date,body.center);
  }

  @Post("/getAllLineState")
  async getAllLineState(@Body() body) {
    let waybi = await this.appService.getWaybillByTsNumber(body.date,body.center,body.tsNumber)
    return  await this.appService.getAllLineState(waybi);
  }
}
